import {
	http
} from '@/utils/http.js'
import {
	getStorage
} from '@/utils/setStorage.js';
const actions = {
	async getPushBadgeNum(context) {
		const token = getStorage('token')
		if (token) {
			try {
				const {
					data: res
				} = await http(true, 'api/notification/totalNumber', '', 'GET');
				if (res.errno === 0) {
					context.commit('SET_PUSHBADGENUM', res.data)
				}
			} catch (e) {
				console.log(e)
			}
		}

	}

}

export default actions